<template>
  <div>
    <ul>
      <li v-for="item in arr" :key="item">
      {{ item }}
      </li>
    </ul>
    <button @click="change">循环数组</button>
    <button @click="btn">按钮</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr:[4,5,6,2,3]
    }
  },
  methods: {
    change() {
    this.arr.push(this.arr[0])
    this.arr.shift()
    },
    btn() {
      this.$set(this.arr, 0 , 1000)
    }
  }
}
</script>

<style>

</style>